import Vue from 'vue';
import App from './App.vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);  // Vue 2 使用的插件安装方式

Vue.config.productionTip = false;

const router = new VueRouter({
  routes: [
    { path: '/', component: () => import('./views/IndexView.vue') },
    { path: '/house', component: () => import('./views/HouseView.vue') },
    { path: '/news', component: () => import('./views/NewsView.vue') },
    { path: '/mine', component: () => import('./views/MineView.vue') },
  ],
});

new Vue({
  render: h => h(App),
  router,
}).$mount('#app');